package com.techedge.insidetrack

class User {

	String userid
	String name
	String password
	String email
	String twitterId
	byte[] avatar
	String avatarType
	
	static constraints = {
		userid (blank:false, nullable:false, size:4..12, matches:"[a-zA-Z1-9_]+")
		password (blank:false, password:true, size:4..12, matches:"[a-zA-Z1-9_]+")
		name (blank:false, nullable:false, size:3..30, matches:"[a-zA-Z1-9_ ]+")
		email (email:true)
		twitterId (blank:true, nullable:true)
		avatar (nullable:true, maxSize: 16384 /* 16K */)
		avatarType (nullable:true)
	}

	String toString(){
		return name;
	}
	
}
